#!/bin/bash
#
# firstboot:         Starts the firstboot druid if it hasn't been run before
#
# chkconfig: 35 99 95
#
# description:       Firstboot is a druid style program that runs on the first time \
#                    a machine is booted after install.  It checks for the existence \
#                    of an /etc/sysconfig/firstboot file.  If it doesn't find the file, \
#                    then the firstboot program needs to run.  If it finds the file, \
#                    firstboot will not be run.
#                    If /etc/reconfigSys exists, run the reconfiguration
#		     program and remove /etc/reconfigSys when done.
#
#                    Also will run if 'reconfig' is on the kernel cmdline.
#

# Source function library.
. /etc/init.d/functions

FILE=kick_start.sh
LOGFILE=/post-install.log

[ -z "$HOME" ] && export HOME=/

case "$1" in
 start)

	if [ -f /etc/init.d/$FILE ]
	then
		/etc/init.d/$FILE MG5000 2>&1 >> $LOGFILE
		rm -rf /etc/init.d/$FILE
		reboot -f
	fi
	;;

 stop)
   rm -f $LOCKFILE
   ;;

 *)
   echo $"Usage: $0 {start|stop}"
   RETVAL=1
esac

exit $RETVAL
